package com.gongpingjialoan.bean;

import android.content.Context;

import com.gongpingjialoan.utility.PreferenceUtils;

public class UseCount
{
    
    // 应用启动次数
    public int appStartCount = 0;
    
    // 应用估值次数
    public int assessmentCount = 0;
    
    // 应用估值清零后的估值次数(弹框拒绝评价后开始使用这个变量)
    public int assessmentCountTwo = 0;
    
    PreferenceUtils mPreferenceUtils;
    
    public UseCount(Context mContext)
    {
        mPreferenceUtils = new PreferenceUtils(mContext);
    }
    
    public UseCount()
    {
    }
    
    public int getAppStartCount()
    {
        return appStartCount;
    }
    
    public void setAppStartCount(int appStartCount)
    {
        this.appStartCount = appStartCount;
    }
    
    public int getAssessmentCount()
    {
        return assessmentCount;
    }
    
    public void setAssessmentCount(int assessmentCount)
    {
        this.assessmentCount = assessmentCount;
    }
    
    public int getAssessmentCountTwo()
    {
        return assessmentCountTwo;
    }
    
    public void setAssessmentCountTwo(int assessmentCountTwo)
    {
        this.assessmentCountTwo = assessmentCountTwo;
    }
    
    public void save(UseCount usecount)
    {
        mPreferenceUtils.saveObject(usecount);
    }
    
    public UseCount load()
    {
        return mPreferenceUtils.loadObject(UseCount.class);
    }
    
}
